//
//  TWLoginViewController.swift
//  EyepetizerImitative
//
//  Created by 田伟 on 2017/3/27.
//  Copyright © 2017年 个人. All rights reserved.
//

import UIKit

class TWLoginViewController: UIViewController {

    // MARK:- 子控件
    @IBOutlet weak var loginView: UIView!
    @IBOutlet weak var nameTextField: UITextField!
    @IBOutlet weak var passwordTextField: UITextField!
    
    @IBOutlet weak var bottomView: UIView!
    @IBOutlet weak var frontButton: UIButton!
    @IBOutlet weak var backButton: UIButton!
    
    // MARK:- 监听控件上的点击
    // 弹出用户协议
    @IBAction func backButtonClick() {
        let userAgreementVc = TWUserAgreementViewController()
        present(userAgreementVc, animated: true, completion: nil)
    }
    // QQ快速登录
    @IBAction func QQQuickLoginClick() {
    }
    // 微信快速登录
    @IBAction func WeChatQuickLoginClick() {
    }
    // 微博快速登录
    @IBAction func weiboQuickLoginClick() {
    }
    // 已有账号登录
    @IBAction func hadCountClickLogin() {
    }
    // 注册账号
    @IBAction func loginButtonClick() {
    }
    // 点击找回密码按钮
    @IBAction func findPasswordClick() {
    }
    @IBAction func dismissButtonClick() {
        dismiss(animated: true, completion: nil)
    }
    
    // MARK:- 系统回调函数
    override func viewDidLoad() {
        super.viewDidLoad()
        initBottomView()
    }
    override var prefersStatusBarHidden: Bool{
        return true
    }
}

// MARK:- 初始化UI
extension TWLoginViewController {
    fileprivate func initBottomView(){
        bottomView.backgroundColor = UIColor(white: 0.2, alpha: 0.4)
        nameTextField.placeholderColor = UIColor.white
        passwordTextField.placeholderColor = UIColor.white
    }
}
